<template>
	<view>
		<view class="tab-bar">
			<u-tabs :list="list" :is-scroll="false" :current="current" active-color="#c6100e" height="80" bg-color="#f8f8f8" @change="change"></u-tabs>
		</view>
		<!-- 拍品模块 -->
    <view class="c1-list" v-if="current == 0">
    	<view class="list">
    	<view class="c1" v-for="(item,index) in auction" :key=index>
    	 <image src="../../../static/007.jpg" mode="" class="c1-image"></image>
			 <image src="../../../static/已获得logo.png" mode="" class="c1-logo"></image>
    	 <view class="c1-text">
    	 	<text>{{item.name}}</text>
    	 </view>
    	 <view class="c1-price">
    	 	<text>{{item.price}}</text>
    	 </view>
    	 <view class="c1-state">
    	 	<text>{{item.state}}</text>
    	 </view>
    	</view>
    	</view>
			
			<view class="list">
			<view class="c1" v-for="(item,index) in auction" :key=index>
			 <image src="../../../static/007.jpg" mode="" class="c1-image"></image>
			 <image src="../../../static/未获得.png" mode="" class="c1-logo"></image>
			 <view class="c1-text">
			 	<text>{{item.name}}</text>
			 </view>
			 <view class="c1-price">
			 	<text>{{item.price}}</text>
			 </view>
			 <view class="c1-state">
			 	<text>{{item.state}}</text>
			 </view>
			</view>
			</view>
    </view>
		
	
	<!-- 卖品模块 -->
   <view class="c1-list" v-if="current == 1">
    	<view class="list">
    	<view class="c1" v-for="(item,index) in auction" :key=index>
    	 <image src="../../../static/person.png" mode="" class="c1-image"></image>
    	 <image src="../../../static/已获得logo.png" mode="" class="c1-logo"></image>
    	 <view class="c1-text">
    	 	<text>{{item.name}}</text>
    	 </view>
    	 <view class="c1-price">
    	 	<text>{{item.price}}</text>
    	 </view>
    	 <view class="c1-state">
    	 	<text>{{item.state}}</text>
    	 </view>
    	</view>
    	</view>
			
			<view class="list">
			<view class="c1" v-for="(item,index) in auction" :key=index>
			 <image src="../../../static/person.png" mode="" class="c1-image"></image>
			 <image src="../../../static/未获得.png" mode="" class="c1-logo"></image>
			 <view class="c1-text">
			 	<text>{{item.name}}</text>
			 </view>
			 <view class="c1-price">
			 	<text>{{item.price}}</text>
			 </view>
			 <view class="c1-state">
			 	<text>{{item.state}}</text>
			 </view>
			</view>
			</view>
    </view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				auction:[
					{
						name:"柳子峻《王者之风》",
						price:"最高出价：1,200,000",
						state:"已结拍"
					},
					{
						name:"柳子峻《虎虎生威》",
						price:"最高出价：1,200,000",
						state:"已结拍"
					}
				],
				list: [
					{
					name: '拍品'
				  }, 
					{
					name: '卖品',
				  }
				],
				current: 0
			}
		},
		methods: {
			change(index) {
			  this.current = index
			}
		}
	}
</script>

<style lang="scss" scoped>
	.tab-bar {
		margin-top: 10rpx;
	}
	
	.c1-list {
		width: 90%;
		display: flex;
		justify-content: space-between;
		margin-top: 20rpx;
	}
	
	.list {
	  width: 350rpx;
	  margin-left: 3%;
	  background-color: #fefffe;
	}
	
	.list .c1 {
		width: 380rpx;
		border-radius: 10rpx;
		background-color: #fefffe;
		height: 520rpx;
		position: relative;
	  margin-left: -5rpx;
	}
	
	.c1 .c1-image {
		width: 350rpx;
		height: 350rpx;
		border-radius: 10rpx 10rpx 0 0 ;
	}
	
	.c1 .c1-logo {
		width: 200rpx;
		height: 200rpx;
		position: absolute;
		right: 0;
		top: 0;
	}
	
	.c1 .c1-text{
		margin-left: 20rpx;
		font-size: 28rpx;
	}
	
	.c1 .c1-price {
		margin-left: 12rpx;
		color: #fc011a;
		font-size: 28rpx;
	}
	
	.c1 .c1-state {
		width: 120rpx;
		height: 40rpx;
		background-color: #666666;
		color: #ffffff;
		line-height: 40rpx;
		text-align: center;
		position: absolute;
		right: 30rpx;
		bottom: 200rpx;
		font-size: 28rpx;
		border-radius:  40rpx 0 0 40rpx;
	}
</style>